<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>背景颜色 字符颜色</title>
    <link rel="stylesheet" href="css/style.css">
    <style>
       html, body {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            width: 100%;
            height: 100%;
            overflow: auto;
        }
        body{
            background: #fff linear-gradient(gray 1%, rgba(128, 128, 128, 0.04));
        }

        p:first-of-type{
            color:red;
        }
        p:nth-child(2n){
            color:purple;
        }
       p:nth-child(3n){
           color:palevioletred;
       }
        p:last-of-type {
            color:yellow;
        }
    </style>
</head>

<body>
<p>Lorem ipsum dolor sit amet.</p>
<p>Consectetur dignissimos in magnam numquam?</p>
<p>Consectetur doloremque enim minus sit.</p>
<p>Cupiditate esse labore quasi totam.</p>
<p>Optio praesentium quis tempore voluptas!</p>
<p>Assumenda eius inventore magni quaerat!</p>
<p>Aperiam fugit nam soluta vero!</p>
</body>
</html>
